package com.tuanzi.loan.web.lazy.receipt.statistics;

import com.tuanzi.loan.business.service.receipt.statistics.ReceiptRechargeStatisticsService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.receipt.statistics.ReceiptRechargeStatisticsSearchRequest;
import com.tuanzi.loan.vo.response.receipt.statistics.ReceiptRechargeStatisticsSearchResponse;
import org.springframework.data.domain.Page;

/**
 * @author lsx
 */
public class ReceiptRechargeStatisticsLazyDataModel extends BaseLazyDataModel<ReceiptRechargeStatisticsSearchRequest, ReceiptRechargeStatisticsSearchResponse> {

    private static final long serialVersionUID = 3218214697955920684L;

    private ReceiptRechargeStatisticsService rechargeStatisticsService = SpringContextHolder.getBean(ReceiptRechargeStatisticsService.class);

    public ReceiptRechargeStatisticsLazyDataModel(ReceiptRechargeStatisticsSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<ReceiptRechargeStatisticsSearchResponse> doLoad(PageSearcher<ReceiptRechargeStatisticsSearchRequest> pageSearcher) {
        return rechargeStatisticsService.list(pageSearcher);
    }

}
